#include <iostream>

using namespace std;

int main_0015(void)
{
    string weeks[] = {
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday",
        "Sunday"
    };

    int week;
    cin >> week;
    cout << weeks[(week - 1) % 7];
    return 0;
}
